Square the given number. Use mental math tricks for faster computation.
Use the algebraic identity by picking a nearby value: (x + a)² = x^2 + 2xa + a².
The trick works because of the algebraic identity. For 50, we get (50 + a)² = 2500 + 100a + a².
The "25" represents 2500/100, the "add/subtract a" handles the 100a term (add if above 50, subtract if below), and "a²" gives the last two digits.
Example: For 53 (a=3), start with 25, add 3 to get 28, multiply by 100 to get 2800, add 3²=9 to get 2809.
For 47 (a=3), start with 25, subtract 3 to get 22, multiply by 100 to get 2200, add 3²=9 to get 2209.
- Near 25: Use (25 + a)² = 625 + 50a + a². E.g., 27² = 625 + 100 + 4 = 729.
- Near 75: Use (75 + a)² = 5625 + 150a + a². E.g., 78² = 5625 + 450 + 9 = 6084.
- Near 100: For n = 100 - b, start with 100 - 2b, append b² (padded to 2 digits). E.g., 98² (b=2): 100 - 4 = 96, append 04 = 9604.
- For even numbers: Square half the number and multiply by 4. E.g., 24² = (12²) × 4 = 144 × 4 = 576.
The square ends in 25, and the front is n/10 × (n/10 + 1). E.g., 35² = 3 × 4 = 12, then 1225.